-
Notifications
You must be signed in to change notification settings - Fork 16
✨ 实现文件树 #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ 实现文件树 #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements an interactive file tree explorer component to replace static text-based directory structures throughout the documentation. The implementation is inspired by PaperMC's documentation and provides a more user-friendly way to visualize file and folder hierarchies with hover-over descriptions.
Key changes:
- Added a reusable
StructureExplorerReact component with popup descriptions - Created 10 data structure files covering various Minecraft server configurations
- Converted multiple
.mdfiles to.mdxto support React components - Added
@iconify/reactdependency for folder/file icons - Implemented dark/light theme support for the component
Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Added baseUrl configuration to support path aliases for imports |
| src/types/ExplorerNode.ts | Defined TypeScript interface for file tree node structure |
| src/data/structures/*.ts | Created 10 data structure files (viaproxy, server directories, BDS, Nukkit, Maven, Gradle, etc.) |
| src/data/structures/index.ts | Barrel export file for all structure data |
| src/css/structure_explorer.css | Component styling with tree lines, hover effects, and popup windows |
| src/css/base/theme.css | Added CSS variables for dark/light theme support |
| src/components/StructureExplorer.tsx | Main React component implementing the interactive file tree |
| package.json | Added @iconify/react dependency |
| pnpm-lock.yaml | Lock file updates for new dependency |
| docs/*.mdx | Converted 7 documentation files from .md to .mdx and integrated the component |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
docs-java/start/basic/server-dir-structure.mdx:7
- The import statement uses a direct path to the data file instead of importing from the barrel export in the index. This should use
import { serverDirStructureData } from "@site/src/data/structures"to maintain consistency with other imports and make refactoring easier.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Dreeam-qwq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看起来不戳
f8ea0c6 to
5109261
Compare
f7737ae to
f8ea0c6
Compare
仿照 https://github.com/PaperMC/docs/blob/5fef1d92b5d7a4744800cfdda2a13ce596451022/src/components/config/ConfigurationStructureDiagram.tsx
示例图:



